package com.ltf.order.feign;

import com.alibaba.fastjson.JSONObject;
import com.ltf.order.feign.fallback.ProductFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Auther: liutf
 * @Date: 2025/3/26
 * @Description: com.ltf.order.feign
 * @version: 1.0
 */


@FeignClient(value = "service-product",
             fallback = ProductFeignClientFallback.class)
public interface ProductFeignClient {

    @GetMapping("/getProduct")
    JSONObject getProductById(@RequestParam("id") Long id);
}
